﻿using AutoMapper;
using DaoService.Entity;
using DaoService.Model;

namespace UI.Models;

public class PlcInfoVariableMapper
{
    // 配置映射
    private static MapperConfiguration configToModel = new MapperConfiguration(cfg => {
        cfg.CreateMap<PlcInfoVariableEntity,PlcInfoVariable>();
    });
    
    private static MapperConfiguration configToEntity = new MapperConfiguration(cfg => {
        cfg.CreateMap<PlcInfoVariable,PlcInfoVariableEntity>();
    });
    
    public static IMapper ToModelMapper
    {
        get
        {
            return configToModel.CreateMapper();
        }
    }
    public static IMapper ToEntityMapper
    {
        get
        {
            return configToEntity.CreateMapper();
        }
    }
}